/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package project.entity;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import project.entity.Papel.Perfil;

/**
 *
 * @author Wolf
 */

@Entity
public class Autor extends Utilizador implements Serializable {

    @OneToMany(mappedBy = "autor")
    private Collection<Submissao> submissoes;

    public Autor() {
    }

    public Autor(Collection<Submissao> submissoes, String password, Long numeroBI, String pNome, String uNome, String email, String empresa, Date dataNascimento, boolean eliminado, Date dataRegisto, String username) {
        super(password, numeroBI, pNome, uNome, email, empresa, dataNascimento, eliminado, dataRegisto, Perfil.Autor, username);
        this.submissoes = submissoes;
    }
    
    /**
     * @return the submissoes
     */
    public Collection<Submissao> getSubmissoes() {
        return submissoes;
    }

    /**
     * @param submissoes the submissoes to set
     */
    public void setSubmissoes(Collection<Submissao> submissoes) {
        this.submissoes = submissoes;
    }
    
}
